home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12441 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: druid.borland.com!usenet
  2. From: pete@borland.com (Pete Becker)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: pointer questions
  5. Date: 20 Mar 1996 00:33:18 GMT
  6. Organization: Borland International
  7. Message-ID: <4injoe$qcp@druid.borland.com>
  8. References: <4ifatf$5a8u@uvaix3e1.comp.UVic.CA>
  9. NNTP-Posting-Host: pbecker.borland.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <4ifatf$5a8u@uvaix3e1.comp.UVic.CA>, cgesy@uvaix.uvic.ca says...
  15. >
  16. >Could someone tell me if there is a difference
  17. >between the declaration "int *thing_ptr" and
  18. >"int* thing_ptr" ?
  19. >
  20.  
  21. There is no difference in their meanings.
  22.  
  23. >Also, what is the difference between "int& data"
  24. >and "int &data" ?
  25. >
  26.  
  27. There is no difference in their meanings.
  28.  
  29. >
  30. >What does the following statement do/mean? :
  31. >
  32. >     ((searchItem&) *this)._refCount++;   //searchItem is the class name
  33.  
  34. It tells the compiler to pretend that the 'this' pointer actually points to an 
  35. object of type searchItem, and to increment the member of that object named 
  36. _refCount.
  37.  
  38.